home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / SYS / s / FW-Unpack_kat.rexx < prev    next >
OS/2 REXX Batch file  |  1996-09-26  |  3KB  |  59 lines

  1. /******************************************************************************
  2. *                                                                             *
  3. *                          FWKatanaUNPACK.rexx V1.0                           *
  4. *                                                                             *
  5. *           ARexx Interface Script for Final Writer, using XPKatana           *
  6. *                                                                             *
  7. *         This script decompress and load files compressed using XPK          *
  8. *                library, and then load them into Final Writer                *
  9. *                                                                             *
  10. *    IMPORTANT: YOU SHOULD CLEAR ALL OTHER FILES OPENED IN FINAL              *
  11. *               WRITER, BECAUSE IF YOU TRY TO SAVE THEM LATER USING           *
  12. *               FWKatanaPACK.rexx SCRIPT, YOU WOULD END UP WITH THE           *
  13. *               WRONG FILE SAVED... THIS IS BECAUSE IT SAVES ONLY THE         *
  14. *               FILE THAT IS IN THE FIRST WINDOW OPENED... "FINALW.1"         *                                 *
  15. *                                                                             *
  16. *                           Uses ARexx Port "KATANA"                          *
  17. *                                                                             *
  18. *        Written by Rémi Létourneau & Eric Sauvageau, December 20th 1995      *
  19. *                                                                             *
  20. ******************************************************************************/
  21.  
  22. OPTIONS RESULTS
  23. SIGNAL ON ERROR
  24.  
  25. /* Adjust this as needed */
  26. XPKATANA_PATH = "SYS:Utilities/XPKatana"
  27.  
  28.  
  29. /* FIRST, we have TO actually Verify is XPKatana is running.          */
  30.   IF ~SHOW('p',"KATANA") THEN
  31.   DO
  32.  
  33. /* IF XPKatana is not already running, start it !                     */
  34.         start = 1
  35.         ADDRESS COMMAND "run <>NIL: "||XPKATANA_PATH||" ICONIFY"
  36.         ADDRESS COMMAND "WaitForPort KATANA"
  37.   END
  38.  
  39. /* speak to XPKatana and get the File Requester                        */
  40.   ADDRESS 'KATANA'
  41.   SETSOURCE "?" ; Filename = RESULT
  42.   If Filename = "NOFILE" Then EXIT   /* No source selected */
  43.  
  44. /* Set XPKatana to "No progress window".                               */
  45.   SETFLAGS NOPROGRESS 1
  46.  
  47. /* Pack the file, keeping the same filename (unless                    */
  48. /* "Handle Suffix" was previously enabled                              */
  49.   UNPACK "T:FWXPK_TMP"
  50.  
  51. /* Quitting XPKatana                                                   */
  52.  
  53.   If start = 1 Then QUIT
  54.  
  55. /* Speak to the Final Writer Port that started this script and save    */
  56. /* the file with the filename that we got from XPKatana's Requester    */
  57.   ADDRESS "FINALW.1"
  58.   OPEN "T:FWXPK_TMP"
  59.